import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    meta:{
      keep:true
    }
  },
  {
    path: '/cate',
    name: 'cate',
    component: () => import('../views/cate.vue'),
    meta:{
      keep:true
    }
  },
  {
    path: '/car',
    name: 'car',
    component: () => import('../views/car.vue'),
    meta:{
      keep:false
    }
  },
  {
    path: '/my',
    name: 'my',
    component: () => import('../views/my.vue'),
    meta:{
      keep:true
    }
  },
  {
    path: '/goodsList',
    name: 'goodsList',
    component: () => import('../views/goodsList.vue'),
    meta:{
      keep:false
    }
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login.vue'),
    meta:{
      keep:false
    }
  },
  {
    path: '/reg',
    name: 'reg',
    component: () => import('../views/reg.vue'),
    meta:{
      keep:false
    }
  },
  {
    path: '/goodsDetail',
    name: 'goodsDetail',
    component: () => import('../views/goodsDetail.vue'),
    meta:{
      keep:false
    }
  }
]

const router = new VueRouter({
  routes
})

export default router
